package com.techsoul.module.basic.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.techsoul.common.core.pojo.vo.UserVo;
import com.techsoul.module.basic.pojo.entity.Customer;
import com.techsoul.module.basic.pojo.entity.Supplier;
import com.techsoul.module.basic.pojo.param.CustomerSaveParam;
import com.techsoul.module.basic.pojo.param.CustomerSearchParam;
import com.techsoul.module.basic.pojo.param.SupplierSearchParam;
import com.techsoul.module.basic.pojo.vo.CustomerVo;
import com.techsoul.module.basic.pojo.vo.StoreVo;
import com.techsoul.module.goods.pojo.entity.Sku;
import com.techsoul.module.goods.pojo.entity.Spu;
import com.techsoul.module.pms.pojo.entity.TWhWarehouseCustomerMaterial;
import com.techsoul.module.pms.pojo.vo.TWhWarehouseCustomerMaterialVo;
import com.techsoul.module.system.pojo.param.UserSaveParam;

import java.util.List;

/**
 * 客户 Service接口
 * 
 * @author liuen
 * @date 2021-01-26
 */
public interface ICustomerService {

    /**
     * 新增
     * @param params
     * @return
     */
    String insert(CustomerSaveParam params);
    String prove(CustomerSaveParam params);
    TWhWarehouseCustomerMaterialVo removeSpecialChar(TWhWarehouseCustomerMaterialVo input);
    TWhWarehouseCustomerMaterial addNewItem(TWhWarehouseCustomerMaterialVo data, UserVo user, int itemNo, int line) ;
    TWhWarehouseCustomerMaterial importData(TWhWarehouseCustomerMaterialVo data,  UserVo user, int itemNo, int line) ;
    void genContainerType(String deliveryPackService,String deliveryPackType,UserVo userVo);
    Spu genNewSpu(String skuCode, String skuName,UserVo user);
    Sku genNewSku(String skuName , String skuCode, Spu spu,UserVo user);

    Customer genNewCust(String customerName, String type,UserVo user);
    Supplier genNewSupplier(String customerName,UserVo user);
        /**
         * 删除
         * @param id
         * @return
         */
    Integer delete(String id);

    /**
     * 批量删除
     * @param idList
     */
    Integer batchDelete(List<String> idList);
    /**
     * 批量删除
     * @param idList
     */
    Integer logicalDelete(List<String> idList);
    /**
     * 修改
     * @param params
     * @return
     */
    Integer update(CustomerSaveParam params);

    /**
     * 详情
     * @param id
     * @return
     */
    CustomerVo findById(String id);

    /**
     * 列表
     * @param params
     * @return
     */
    List<CustomerVo> findAll(CustomerSearchParam params);
    CustomerVo getMyCustInfor();
    /**
     * 列表-分页
     * @param params
     * @param current
     * @param pageSize
     * @return
     */
    IPage<CustomerVo> findAll(CustomerSearchParam params, Integer current, Integer pageSize);
    /**
     * 校验客户编码
     * @param params
     * @return
     */
    Boolean checkCode(CustomerSearchParam params);
    /**
     * 通过编码查询
     * @param code
     * @return
     */
    CustomerVo findByCode(String code);

    void fixdata();

    String insertBizUser(UserSaveParam params);
}
